Setup
8
Mac OS users / Windows users
I will cover only Linux in this book, at least in the initial versions.
Linux is the operating system used in the vast majority of cloud solutions, and is the de facto most
widespread Unix on servers, and this is a good reason to cover it.
I’m using Linux on my personal computers as well, but the majority of programmers use a Mac or
a Windows machine. The main reason for not covering Mac OS is that its default terminal is not
100% compatible with the Linux counterparts (as Mac doesn’t use the GNU utilities). I don’t have a
Mac and even if I could cover all the different versions of the utilities, I think this would be daunting
for beginners. The main reason for not covering Windows is that it is not even a Unix. I know that
recent versions include some sort of Linux layer, but again I don’t have time and interest in those
systems.
So if you are using Mac OS X or Windows, you will have to run Linux in a Docker container. I will
provide here two different solutions, the first one is simple but will be missing some parts of the
system, while the second is a bit more complex but complete. Please note that in either case you
need to have Docker installed in your system, refer to the Docker documentation⁹ for instructions
on how to do it.
You can come back at any time and run the more complex solution if you initially decided to go for
the simple one and you want to try the more complete version.
Simple solution
You can run the default Ubuntu image in Docker. This image has been stripped to be smaller, so you
will miss some of the documentation that comes with a Linux system, called “man pages”. We will
use them in the first lesson and I encourage the reader to use them to learn how to use commands,
so if you go for this solution you will have to refer to the online man pages every time you need
help on a command. I will mention the online resources in the relevant chapter of the book, so don’t
worry now.
To run the Ubuntu image first clone the repository with the example files, enter that directory and
run Docker. The commands are
$ git clone https://github.com/bgutbook/bgutbook_files.git
$ cd bgutbook_files
$ docker run -t -i -v $(pwd):/opt/bgutbook_files ubuntu /bin/bash
root@1d888c92ee76:/#
As you can see the prompt changes, which tells you that you are inside the Linux container. Please
note that the number that follows the @ sign in the prompt is the ID of the running Docker container,
so it will be different for you. At that point move to the directory that contains the example files
inside the container
⁹https://docs.docker.com/install/